/* ===================

AX2E (AXESCON XACML 2.0 Engine) is the Java authorization engine, which implements OASIS XACML 2.0 standard.
Copyright (C) 2007 AXESCON LLC

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA


Contact: AXESCON LLC - info{at}axescon.com

 =================== */
/*
 * XML Type:  Policy
 * Namespace: urn:oasis:names:tc:xacml:2.0:policy:schema:os
 * Java type: Policy
 *
 * Automatically generated - do not modify.
 */
package axescon.xacml.model.policy;

import axescon.xacml.api.CtxHandler;
import axescon.xacml.api.PolicyEvaluator;
import axescon.xacml.api.XacmlException;
import axescon.xacml.model.ctx.Result;
import axescon.xacml.model.ctx.XacmlCtx;


/**
 * @author argyn
 *         Date: Oct 12, 2005
 *         Responsibilities: generic interface of Policy and PolicySet objects in XACML Policy schema,
 * as well as references to them inside the policyset.
 * i couldn't come up with a better bame than proxy.
 *
 */
public interface PolicyProxy extends PolicyModelObject {

    /**
     * if of the policy or policy set
     *
     * @return string policy id
     */
    String getId();

    /**
     * Gets the "Version" attribute
     */
    String getVersion();

    /**
     * evaluates this policy
     * @param pe policy evaluator
     * @param req request
     * @param ch context handler
     * @return XACML Context Result of evaluation
     * @throws XacmlException
     */
    public Result eval(PolicyEvaluator pe, XacmlCtx req, CtxHandler ch) throws XacmlException;

    /**
     * validates this policy
     * @param pe policy evaluator
     * @throws XacmlException
     */
    void validate(PolicyEvaluator pe) throws XacmlException;
}
